file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/gen/srcs/")

set(PRIV_REQUIRES )
if(NOT PRIV_REQUIRES)
	set(PRIV_REQUIRES "")
endif()

set(REQUIRES )
if(NOT REQUIRES)
	set(REQUIRES "")
endif()

set(INCLUDE_DIRS "${CMAKE_CURRENT_LIST_DIR}/include/")
if(NOT IS_DIRECTORY ${INCLUDE_DIRS})
	set(INCLUDE_DIRS "")
endif()

idf_component_register(
	SRCS "${CMAKE_CURRENT_BINARY_DIR}/gen/srcs/empty.c"
	INCLUDE_DIRS ${INCLUDE_DIRS}
	REQUIRES ${REQUIRES}
	PRIV_REQUIRES ${PRIV_REQUIRES}
)

add_custom_command(
	"OUTPUT" "${CMAKE_CURRENT_BINARY_DIR}/gen/srcs/empty.c"
	COMMAND ${CMAKE_COMMAND} -E touch "${CMAKE_CURRENT_BINARY_DIR}/gen/srcs/empty.c"
)

target_link_libraries(${COMPONENT_LIB} "-Wl,--whole-archive ${CMAKE_CURRENT_LIST_DIR}/lib/${IDF_TARGET}/lib${COMPONENT_NAME}.a -Wl,--no-whole-archive")
